import Vue from 'vue'
import Router from 'vue-router'

// 引入公共样式
import '../assets/css/reset.css'

Vue.use(Router)
//引入视图窗口的组件
import Home from '../views/home'
import MPhone from '../views/mPhone'
import Shop from '../views/shop'

import PageOne from '../views/page_one'
import PageTwo from '../views/page_two'
import PageThree from '../views/page_three'
import PageFoure from '../views/page_foure'
import PageFive from '../views/page_five'
import Item from '@/views/item'
import Cart from '../views/cart'
import Checkout from '../views/checkout'
import Payment from '../views/payment'
import Account from '../views/account'
import Order from '../views/account/order'
import Address from '../views/account/address'


const router = new Router({
  mode:'history',
  routes: [
    {path:'/',component:Home},
    {path:'/Home',component:Home},
    {path:'/MPhone',component:MPhone},
    {path:'/Shop',component:Shop},
    {path:'/PageOne',component:PageOne},
    {path:'/PageTwo',component:PageTwo},
    {path:'/PageThree',component:PageThree},
    {path:'/PageFoure',component:PageFoure},
    {path:'/PageFive',component:PageFive},
    {path:'/Item', name:'Item',component:Item},
    {path:'/Cart',name:'Cart',component:Cart},
    {path:'/Checkout',name:'Checkout',component:Checkout},
    {path:'/Payment',name:'Payment',component:Payment},
    {
        path:'/Account',
        name:'Account',
        component:Account,
        children:[{
            path:'',
            name:'Account',
            component:Order
        },
        {
            path:'/address',
            name:'Address',
            component:Address
        }]
    }, 
  ]
})

export default router;


